<T:ViewBase x:Class="WPFExcelReport.TKHIS02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    Background="White"  
                    Loaded="Window_Loaded"
     >
    <T:ViewBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>  
    </T:ViewBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
        <WrapPanel>
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHMANDANT:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHMANDANT}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHKUNDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHKUNDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHLFDNR:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHLFDNR}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHDATE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHDATE}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHDATEI:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHDATEI}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHTRTYPE:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHTRTYPE}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHVERS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHVERS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHVERS2:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHVERS2}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHPOS:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHPOS}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHKREDLIM:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHKREDLIM}" Width="Auto" />
            </Grid> 
           <Grid Margin="10,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=KHKREDVON:}}"></TextBlock>
                 <TextBox Grid.Column="1"  CharacterCasing="Upper"   Text="{Binding dwKHIS.KHKREDVON}" Width="Auto" />
            </Grid> 
        </WrapPanel>
        <WrapPanel Visibility="{Binding IsKHIS,Converter={StaticResource ResourceKey=bv}}">
                <ex:TBASE1></ex:TBASE1>
            </WrapPanel>
        </StackPanel>
        <DataGrid  Grid.Row="1"  VerticalAlignment="Top"  
                                   AutoGenerateColumns="False"
                                   EnableRowVirtualization="False"
                                   VerticalScrollBarVisibility="Auto"
                                   HorizontalScrollBarVisibility="Auto"
                                   HeadersVisibility="Column"     
                                   ItemsSource="{Binding vwKHIS}"  
                                    IsSynchronizedWithCurrentItem="True"
                                   SelectedItem="{Binding Path=dwKHIS, Mode=TwoWay}"
                                   x:Name="dlgVKP"  
                                   RowDetailsVisibilityMode="Visible" Grid.ColumnSpan="2" Margin="0,0.2,0.2,0"
                    >
            <DataGrid.Columns> 
                <DataGridTextColumn x:Name="KHMANDANT"
                                    Binding="{Binding Path=KHMANDANT, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHMANDANT}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHKUNDNR"
                                    Binding="{Binding Path=KHKUNDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHKUNDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHLFDNR"
                                    Binding="{Binding Path=KHLFDNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHLFDNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHDATE"
                                    Binding="{Binding Path=KHDATE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHDATE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHDATEI"
                                    Binding="{Binding Path=KHDATEI, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHDATEI}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHTRTYPE"
                                    Binding="{Binding Path=KHTRTYPE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHTRTYPE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHVERS"
                                    Binding="{Binding Path=KHVERS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHVERS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHVERS2"
                                    Binding="{Binding Path=KHVERS2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHVERS2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHPOS"
                                    Binding="{Binding Path=KHPOS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHPOS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHKREDLIM"
                                    Binding="{Binding Path=KHKREDLIM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHKREDLIM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHKREDVON"
                                    Binding="{Binding Path=KHKREDVON, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHKREDVON}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHKREDBIS"
                                    Binding="{Binding Path=KHKREDBIS, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHKREDBIS}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHVERSTAGE"
                                    Binding="{Binding Path=KHVERSTAGE, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHVERSTAGE}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHVERSNR"
                                    Binding="{Binding Path=KHVERSNR, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHVERSNR}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHCOM1"
                                    Binding="{Binding Path=KHCOM1, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHCOM1}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHCOM2"
                                    Binding="{Binding Path=KHCOM2, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHCOM2}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHWVTERM"
                                    Binding="{Binding Path=KHWVTERM, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHWVTERM}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHFILLER"
                                    Binding="{Binding Path=KHFILLER, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHFILLER}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHAENZL"
                                    Binding="{Binding Path=KHAENZL, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHAENZL}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHAENB"
                                    Binding="{Binding Path=KHAENB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHAENB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHAEND"
                                    Binding="{Binding Path=KHAEND, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHAEND}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHNEUB"
                                    Binding="{Binding Path=KHNEUB, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHNEUB}}"
                                    Width="Auto" />
                <DataGridTextColumn x:Name="KHNEUD"
                                    Binding="{Binding Path=KHNEUD, Converter={StaticResource ResourceKey=Trim}, Mode=TwoWay}"
                                    Header="{Binding Source={Localization:Translate Word=KHNEUD}}"
                                    Width="Auto" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</T:ViewBase> 
 
